﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ServicosConsulta.aspx.cs" Inherits="NewTierra.Pages.Servicos.ServicosConsulta" %>

<!DOCTYPE html>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <link rel="shortcut icon" href="../../images/Icones/favicon.ico" type="image/x-icon" />

    <link href="../../Styles/jquery_notification.css" rel="stylesheet" />

    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

    <script type="text/javascript" src="../../Scripts/jquery_notification_v.1.js"></script>

    <link href="~/Styles/EstiloGeral.css" rel="stylesheet" type="text/css" />

    <style type="text/css">
        .ModalPopupBG {
            background-color: gray;
            filter: alpha(opacity=60);
            opacity: 0.7;
        }

        .ModalPopup {
            border: 1px solid #E6E6E6;
            background-color: #fff;
            padding: 3px;
        }

        #servicos {
            height: auto;
            width: 1330px;
            margin-top: 20px;
            margin-left: 5px;
            margin-right: 5px;
        }

        #ServicosForm {
            width: 1302px;
            height: 600px;
        }

            #ServicosForm .FiltrosServicos {
                border: 1px solid #999;
                margin: 5px 5px 5px 5px;
                padding: 10px;
                background-color: #EEE;
                height: auto;
                background: #FAFAFA;
                color: #666;
            }

            #ServicosForm .ServCadastro {
                height: 271px;
                float: left;
                width: 366px;
            }

            #ServicosForm .ServEsq {
                height: 560px;
                float: left;
                width: 403px;
            }

        .SetServico {
            height: auto;
            float: left;
            width: auto;
            border: 1px solid #d9d9d9;
        }

            .SetServico .form_titulo {
                height: 40px;
                font-size: 22px;
                font-family: Arial;
                margin-bottom: 5px;
                color: #000;
                text-align: center;
                line-height: 40px;
                background: rgb(242,249,254); /* Old browsers */
                background: -moz-linear-gradient(top, rgba(242,249,254,1) 0%, rgba(214,240,253,1) 100%); /* FF3.6+ */
                background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(242,249,254,1)), color-stop(100%,rgba(214,240,253,1))); /* Chrome,Safari4+ */
                background: -webkit-linear-gradient(top, rgba(242,249,254,1) 0%,rgba(214,240,253,1) 100%); /* Chrome10+,Safari5.1+ */
                background: -o-linear-gradient(top, rgba(242,249,254,1) 0%,rgba(214,240,253,1) 100%); /* Opera 11.10+ */
                background: -ms-linear-gradient(top, rgba(242,249,254,1) 0%,rgba(214,240,253,1) 100%); /* IE10+ */
                background: linear-gradient(to bottom, rgba(242,249,254,1) 0%,rgba(214,240,253,1) 100%); /* W3C */
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f9fe', endColorstr='#d6f0fd',GradientType=0 ); /* IE6-9 */
            }

            .SetServico .form_into {
                width: 650px;
                height: 410px;
                padding: 5px;
                background: #fff;
                margin-bottom: 10px;
                border-bottom-left-radius: 10px;
                border-bottom-right-radius: 10px;
            }

        #ServicosForm .ServDir {
            height: 503px;
            float: left;
            width: 817px;
            margin-left: 20px;
        }

        #ServicosForm .BotoesServico {
            height: 36px;
            float: left;
            width: 369px;
        }

        #SetSupplier {
            height: 606px;
        }

        .InfoLongServico {
            width: auto;
            height: 330px;
        }

        .InfoShortServico {
            width: auto;
            height: 330px;
        }

        .FiltroTipoServico {
            height: 104px;
            width: 253px;
        }

            .FiltroTipoServico .FiltroTipoServico_tipo {
                height: 45px;
                margin-top: 6px;
                float: left;
                width: 116px;
            }

            .FiltroTipoServico .FiltroTipoServico_categ {
                height: 32px;
                margin-left: 5px;
                margin-top: 6px;
                float: left;
            }

        .AddInfoVoucher {
            width: 827px;
            float: left;
            height: 133px;
        }

        .addInfoOperador {
            width: 373px;
            float: left;
        }

        .AddInfoCliente {
            width: 445px;
            float: left;
            margin-left: 10px;
        }

        #Operador {
            width: 840px;
            height: 326px;
        }

        .ServicoFormularioCrud {
            height: 336px;
            margin: 5px 5px 5px 5px;
            padding: 5px;
            display: inline;
            float: left;
            position: relative;
            border: 1px solid #E6E6E6;
            background: #FAFAFA;
            color: #666;
            width: 390px;
            top: 0px;
            left: 0px;
        }

        .FiltroStatus_Cidade {
            width: 380px;
        }

            .FiltroStatus_Cidade .FiltroStatus {
                width: 88px;
                float: left;
            }

            .FiltroStatus_Cidade .FiltroCidade {
                width: 265px;
                float: left;
            }

        #TarifasForm {
            height: 588px;
        }

            #TarifasForm .MServicoFormEsq {
                height: 552px;
                width: 520px;
                margin-top: 20px;
                float: left;
            }

            #TarifasForm .MServicoFormDir {
                height: 393px;
                width: 470px;
                margin-top: 20px;
                float: left;
                margin-left: 30px;
            }

        .MServicoSuppliers {
            height: auto;
            padding: 5px;
            display: inline;
            float: left;
            position: relative;
            border: 1px solid #E6E6E6;
            background: #FAFAFA;
            color: #666;
            margin-top: 0px;
            width: 488px;
        }

        .MServicoSuppliersConsulta {
            height: auto;
            padding: 5px;
            display: inline;
            float: left;
            position: relative;
            border: 1px solid #E6E6E6;
            background: #FAFAFA;
            color: #666;
            margin-top: 0px;
            width: 810px;
            top: 0px;
            left: 0px;
        }

        .AddServicosSuppliers {
            height: 200px;
            width: 487px;
            overflow-x: auto;
            overflow-y: auto;
            margin-top: 9px;
        }

        .SetMServicoBase {
            height: 402px;
        }

        .SetMServicoSupplier {
            height: auto;
        }

        .SupplierBase {
            height: 370px;
            overflow-x: hidden;
            overflow-y: auto;
        }

        .AddSubServico {
            height: 46px;
            margin-top: 10px;
            float: left;
            width: 454px;
        }

        #TarifasServico {
            width: 1324px;
            height: 589px;
        }

            #TarifasServico .MServicoSozinhoFormEsq {
                height: 450px;
                width: 520px;
                margin-top: 20px;
                float: left;
            }

            #TarifasServico .MServicoSozinhoFormDir {
                height: 517px;
                width: 716px;
                margin-top: 20px;
                float: left;
                margin-left: 30px;
            }

        .FormMoeda_Obs {
            height: 64px;
            float: left;
        }

            .FormMoeda_Obs .FormMoeda_Obs_moeda {
                width: 82px;
                float: left;
            }

            .FormMoeda_Obs .FormMoeda_Obs_obs {
                width: 365px;
                float: left;
                height: 53px;
            }

        .FromDatas {
            height: 49px;
            float: left;
        }

            .FromDatas .dataFrom {
                width: 129px;
                float: left;
            }

            .FromDatas .dataTo {
                width: 129px;
                float: left;
            }

        .FormTipoServico {
            height: 51px;
            float: left;
            width: 360px;
        }

            .FormTipoServico .FormTipoServico_categoria {
                height: 37px;
                float: left;
                width: 171px;
            }

            .FormTipoServico .FormTipoServico_tiposervico {
                height: 38px;
                float: left;
                width: 127px;
            }

        .GridMServico_Filtro {
            padding: 10px;
            height: 480px;
        }

        .bases_filtros {
            width: 606px;
            height: 155px;
        }

            .bases_filtros .bases_filtros_drops {
                float: left;
                width: 150px;
                height: 51px;
            }

        .bases_filtros_box {
            width: 587px;
            float: left;
            height: 40px;
            margin-top: 9px;
        }

        .GridBaseServicoSozinho {
            height: 225px;
            width: 417px;
            overflow-x: hidden;
            overflow-y: auto;
        }

        .ModalPopupBG {
            background-color: gray;
            filter: alpha(opacity=60);
            opacity: 0.7;
        }

        .ModalPopup {
            border: 1px solid #E6E6E6;
            background-color: #fff;
            padding: 3px;
        }

        .MServicoSuppliers_into_nomesupplier {
            width: 459px;
            float: left;
        }

        .MServicoSuppliers_into_btnTemporada {
            width: 426px;
            float: left;
            height: 35px;
            margin-top: 10px;
        }

        .MServicoSuppliers_into {
            height: 37px;
            float: left;
            width: 484px;
        }

        #TarifasServicosPorSupp {
            width: 1324px;
            height: 589px;
        }

        .GridServPorSupp {
            height: 466px;
            overflow: auto;
        }

        .filtro_nomeSupplier {
            width: 374px;
            float: left;
            height: 46px;
        }

        .filtro_nomeSupplier_btns {
            height: 42px;
            width: 68px;
            float: left;
            margin-top: 0px;
        }
    </style>

</head>
<body>

    <form id="formulario" runat="server">

        <script type="text/javascript">

            jQuery(function ($) {
                $.datepicker.regional['pt-BR'] = {
                    closeText: 'Fechar',
                    prevText: '&#x3c;Anterior',
                    nextText: 'Pr&oacute;ximo&#x3e;',
                    currentText: 'Hoje',
                    monthNames: ['Janeiro', 'Fevereiro', 'Mar&ccedil;o', 'Abril', 'Maio', 'Junho',
                 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
                    monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun',
                 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
                    dayNames: ['Domingo', 'Segunda-feira', 'Ter&ccedil;a-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sabado'],
                    dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
                    dayNamesMin: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
                    weekHeader: 'Sm',
                    dateFormat: 'dd/mm/yy',
                    firstDay: 0,
                    isRTL: false,
                    showMonthAfterYear: false,
                    yearSuffix: ''
                };
                $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
            });

            function jScript() {
                $("input[id$=from]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=to]").datepicker("option", "minDate", selectedDate);
                    }
                });
                $("input[id$=to]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=from]").datepicker("option", "maxDate", selectedDate);
                    }
                });

                $("input[id$=txtDataFromSubServico]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtDataToSubServico]").datepicker("option", "minDate", selectedDate);
                    }
                });
                $("input[id$=txtDataToSubServico]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtDataFromSubServico]").datepicker("option", "maxDate", selectedDate);
                    }
                });

                $("input[id$=txtPeriodoFromCopiarMServSozinho]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtPeriodoToCopiarMServSozinho]").datepicker("option", "minDate", selectedDate);
                    }
                });
                $("input[id$=txtPeriodoToCopiarMServSozinho]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtPeriodoFromCopiarMServSozinho]").datepicker("option", "maxDate", selectedDate);
                    }
                });

                $("input[id$=txtdata]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1
                });

                $("input[id$=txtdataFooter]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1
                });

                $("input[id$=txtdataFrom]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtdataTo]").datepicker("option", "minDate", selectedDate);
                    }
                });
                $("input[id$=txtdataTo]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtdataFrom]").datepicker("option", "maxDate", selectedDate);
                    }
                });

                $("input[id$=txtdataFromFooter]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtdataToFooter]").datepicker("option", "minDate", selectedDate);
                    }
                });
                $("input[id$=txtdataToFooter]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtdataFromFooter]").datepicker("option", "maxDate", selectedDate);
                    }
                });

                $("input[id$=txtPeriodoFromCopiarTempoSubServ]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtPeriodoToCopiarTempoSubServ]").datepicker("option", "minDate", selectedDate);
                    }
                });
                $("input[id$=txtPeriodoToCopiarTempoSubServ]").datepicker({
                    defaultDate: "+1w",
                    changeMonth: true,
                    changeYear: true,
                    numberOfMonths: 1,
                    onClose: function (selectedDate) {
                        $("input[id$=txtPeriodoFromCopiarTempoSubServ]").datepicker("option", "maxDate", selectedDate);
                    }
                });




                $("#tabs").tabs();

                $("#Calc").dialog({
                    autoOpen: false,
                    modal: true,
                    show: {
                        effect: "blind",
                        duration: 1000
                    }
                });

                $("#OpenCalc").click(function () {
                    $("#Calc").dialog("open");
                });

                $("input[id*='txtValorServicoSozinho']").change(function (event) {

                    if ($('#chkPercentValorSS').is(':checked')) {

                        var val1 = parseInt($(this).parent().find("input[id*='txtValorServicoSozinho']").val(), 10);
                        var val2 = parseInt($('#txtValorAdicional').val(), 10);
                        var soma = val1 + val2;
                        var Percent = parseInt($('#txtPercentValorAdicional').val(), 10);

                        if (Percent == 0) {

                            var num = soma.toString().replace(".", ",");

                            var result = $(this).parent().find("input[id*='txtValorServicoSozinho']").val(num);
                        }
                        else {

                            var percentAd = ((soma * Percent) / 100) + soma;

                            var num = percentAd.toString().replace(".", ",");

                            var result = $(this).parent().find("input[id*='txtValorServicoSozinho']").val(num);
                        }
                    }


                });


                $("#txtfromReport").datepicker();
                $("#txttoReport").datepicker();


                $("#txtfromReportTarifario").datepicker();
                $("#txttoReportTarifario").datepicker();
            }


            function CallServerServicos() {
                document.getElementById('<%= btnFiltroNomeServicos.ClientID %>').click();
            }

            function OpenInfos(siteInfos) {
                var home = siteInfos;
                javascript: window.open(home);
            }

            function AbrirPopUp(url, title, w, h) {
                var left = (screen.width / 2) - (w / 2);
                var top = (screen.height / 2) - (h / 2);
                return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left + '');
            }

            function ShowIcon() {
                var e = document.getElementById("processing");
                e.style.visibility = (e.style.visibility == 'visible') ? 'hidden' : 'visible';
            }

            function ShowIcon2() {
                var e = document.getElementById("processing2");
                e.style.visibility = (e.style.visibility == 'visible') ? 'hidden' : 'visible';
            }

            function ShowIcon3() {
                var e = document.getElementById("processing3");
                e.style.visibility = (e.style.visibility == 'visible') ? 'hidden' : 'visible';
            }

            function ShowIcon4() {
                var e = document.getElementById("processing4");
                e.style.visibility = (e.style.visibility == 'visible') ? 'hidden' : 'visible';
            }

            function CallServerServico() {
                document.getElementById('<%= btnFiltroNomeSupplier.ClientID %>').click();
            }

            function CallServerMontaServico() {
                document.getElementById('<%= btnFiltroNomeMontaServicoSupplier.ClientID %>').click();
            }

            function CallServerServPorSupp() {
                document.getElementById('<%= btnFiltroSupplierServPorSupp.ClientID %>').click();
            }

            function showAutoCloseMessage(MsgsExc) {
                showNotification({
                    message: MsgsExc,
                    autoClose: true,
                    type: "success",
                    duration: 5
                });
            }

        </script>

        <asp:ScriptManager ID="ScriptManagerServico" runat="server">
        </asp:ScriptManager>

        <div class="bgHeader">

            <div class="bgHeader_into">

                <asp:ImageButton ID="ImgVoltarMenu" runat="server" ImageUrl="~/images/Icones/iconeMenu2.png" OnClick="VoltarMenu" ToolTip="Menu" />

            </div>

            <div class="bgHeader_into">

                <asp:Label ID="lblSupplierHeader" runat="server" Text="Serviços" CssClass="titulo" />

            </div>

        </div>

        <div id="servicos">

            <div id="tabs">
                <ul>
                    <li><a href="#tabs-1">Serviços</a></li>
                    <li><a href="#tabs-2">Tarifas</a></li>
                    <li><a href="#tabs-3">Sub Serviços</a></li>
                    <li><a href="#tabs-4">Serviços Por Supplier</a></li>
                </ul>

                <div id="tabs-1">

                    <asp:UpdatePanel ID="UpdatePanelCadServico" runat="server">
                        <Triggers>
                            <asp:PostBackTrigger ControlID="btnGerarRelatorioServico" />
                            <asp:PostBackTrigger ControlID="btnGerarRelatorioServicoTarifario" />
                        </Triggers>
                        <ContentTemplate>

                            <div id="ServicosForm">

                                <div class="ServEsq">

                                    <div class="SetServico">

                                        <div class="form_titulo">
                                            Serviço
                                                <asp:Label ID="lblServicoNomeTituloTXT" runat="server" Style="font-size: 15px;" ForeColor="Red" />
                                        </div>

                                        <div class="FiltrosServicos radius">

                                            <asp:Label runat="server" ID="lblCidadeServicoFiltroTXT" Text="Cidade:" />
                                            <asp:DropDownList ID="ddlCidadeServicoFiltro" OnSelectedIndexChanged="DDCidadeServicoFiltro_SelectedIndexChanged" runat="server" AutoPostBack="True">
                                            </asp:DropDownList>
                                            <br />

                                            <asp:TextBox ID="txtServicos" runat="server" placeholder="Informe o nome do serviço." Width="340px" MaxLength="80"></asp:TextBox>

                                            <asp:ImageButton ID="btnImgFilter" runat="server" ImageUrl="~/images/Icones/iconFilterPeq.png" OnClick="btnImgFilter_Click" />


                                            <asp:AutoCompleteExtender
                                                ID="AutoCompleteExtenderServicos"
                                                runat="server"
                                                CompletionInterval="100"
                                                DelimiterCharacters=""
                                                EnableCaching="False"
                                                Enabled="True"
                                                MinimumPrefixLength="1"
                                                OnClientItemSelected="CallServerServicos"
                                                OnClientPopulated="ShowIcon"
                                                OnClientPopulating="ShowIcon"
                                                ServiceMethod="SearchServicos"
                                                TargetControlID="txtServicos" ServicePath="">
                                            </asp:AutoCompleteExtender>
                                            <img id="processing" alt="load" style="visibility: hidden" src="../../images/ajax-loader.gif" /><asp:Button ID="btnFiltroNomeServicos" Style="display: none" runat="server" OnClick="CarregarServicoNome_click" />
                                            <br />

                                            <div class="FiltroTipoServico" style="display: <%=displayFiltro%>">

                                                <div class="FiltroTipoServico_tipo">
                                                    <asp:Label runat="server" ID="lblTipoServicosFiltroTXT" Text="Tipo Serviço:" /><br />
                                                    <asp:DropDownList ID="DDTipoServicoFiltro" OnSelectedIndexChanged="DDTipoServicoFiltro_SelectedIndexChanged" runat="server" AutoPostBack="True">
                                                    </asp:DropDownList>
                                                </div>

                                                <div class="FiltroTipoServico_tipo">
                                                    <asp:Label runat="server" ID="lblTipoServicosCategFiltroTXT" Text="Categoria:" /><br />
                                                    <asp:DropDownList ID="ddlTipoServicoCategFiltro" OnSelectedIndexChanged="DDTipoServicoCategFiltro_SelectedIndexChanged" runat="server"
                                                        AutoPostBack="True">
                                                    </asp:DropDownList>
                                                </div>

                                                <div class="FiltroTipoServico_tipo">
                                                    <asp:Label runat="server" ID="lblStatusFiltroTXT" Text="Status:" /><br />
                                                    <asp:DropDownList ID="DDStatusFiltro" OnSelectedIndexChanged="DDStatusFiltro_SelectedIndexChanged" runat="server" AutoPostBack="True">
                                                    </asp:DropDownList>
                                                </div>

                                            </div>

                                        </div>

                                        <div class="ServicoFormularioCrud radius">

                                            <div class="ServCadastro">
                                                <asp:TextBox ID="txtCodServico" runat="server" Style="display: none;" /><p class="paragrafo">
                                                    <asp:Label ID="lblNomeServicoTXT" runat="server" Text="Nome:"></asp:Label><br />
                                                    <asp:TextBox ID="txtNomeServico" runat="server" Width="300px" MaxLength="80" /><asp:RequiredFieldValidator
                                                        ID="RqFieldNomeServico"
                                                        runat="server"
                                                        ControlToValidate="txtNomeServico"
                                                        ErrorMessage="*"
                                                        ValidationGroup="Salvar"
                                                        ToolTip="Informe um nome."></asp:RequiredFieldValidator>
                                                </p>
                                                <table cellspacing="0" cellpadding="0" style="border: none;">
                                                    <tr style="height: 20px;">
                                                        <td colspan="2">
                                                            <%--<asp:Label ID="lblSIB" runat="server" Text="SIB:"></asp:Label>--%>
                                                            <asp:CheckBox ID="chkSIB" Text="SIB" runat="server" />
                                                            <asp:CheckBox runat="server" ID="chkRecommended" Text="Recommended" />
                                                        </td>
                                                    </tr>
                                                    <tr style="height: 50px;">
                                                        <td>
                                                            <asp:Label ID="lblStatusServicoTXT" runat="server" Text="Status:"></asp:Label><br />
                                                            <asp:DropDownList ID="ddlStatusServicos" runat="server"></asp:DropDownList>
                                                        </td>                                                        
                                                    </tr>
                                                    <tr>
                                                        <td style="width: 120px;">
                                                            <asp:Label ID="lblTipoServicoTXT" runat="server" Text="Tipo Serviço:"></asp:Label><br />
                                                            <asp:DropDownList ID="ddlTipoServico" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlTipoServico_SelectedIndexChanged"></asp:DropDownList>
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblTipoServicoCategTXT" runat="server" Text="Categoria:"></asp:Label><br />
                                                            <asp:DropDownList ID="ddlTipoServicoCateg" runat="server"></asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                </table>

                                                <p class="paragrafo">
                                                    <asp:Label ID="lblPaisServicoTXT" runat="server" Text="Pais:"></asp:Label><br />
                                                    <asp:DropDownList ID="ddlPaisServicos" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPaisServicos_SelectedIndexChanged"></asp:DropDownList>
                                                </p>
                                                <p class="paragrafo">
                                                    <asp:Label ID="lblCidadeServicoTXT" runat="server" Text="Cidade:"></asp:Label><br />
                                                    <asp:DropDownList ID="ddlCidadeServicos" runat="server"></asp:DropDownList>
                                                </p>
                                            </div>
                                            <div class="BotoesServico">
                                                <asp:Button ID="btnNovoServico" runat="server" Text="Salvar" CssClass="btnGeralAzul" OnClick="CadastrarServico" ValidationGroup="Salvar" />
                                                <asp:Button ID="btnAtualizarServico" runat="server" CssClass="btnGeralAzul" OnClick="AtualizarServico" Text="Atualizar" ValidationGroup="Salvar" Visible="false" />
                                                <asp:Button ID="btnExcluirServico" runat="server" CssClass="btnGeralAzul" OnClick="ExcluirServico" Text="Excluir" OnClientClick="return confirm('Excluindo esse serviço, todos as tarifas, fotos e infos do mesmo também serão excluídas. Confirma?');" />
                                                <asp:Button ID="btnLimparServico" runat="server" CssClass="btnGeralAzul" OnClick="LimparServico" Text="Limpar" />
                                                <asp:Button ID="btnGerarRelatorioServicoPopUp" runat="server" CssClass="btnGeralAzul" OnClick="btnGerarRelatorioServicoPopUp_Click" Text="Imprimir" />
                                                <asp:Button ID="btnGerarRelatorioServicoPopUpTarifario" runat="server" CssClass="btnGeralAzul" OnClick="btnGerarRelatorioServicoPopUpTarifario_Click" Text="Imprimir Tarifario" /><br />
                                                <asp:Button ID="btnRelatorioServico_fake" runat="server" Style="display: none" />
                                                <asp:Button ID="btnRelatorioServicoTarifario_fake" runat="server" Style="display: none" />

                                                <asp:Panel ID="painelModalRelatorioServico" runat="server" CssClass="ModalPopup" Style="display: none; width: auto; height: auto; overflow-x: hidden; overflow-y: auto; border-radius: 5px;">
                                                    <asp:ImageButton ID="btnFecharPainelModalRelatorioServico" ToolTip="Fechar" runat="server" ImageUrl="../../images/Icones/close2.png" Width="20px" Height="20px" />
                                                    <table>
                                                        <tr>
                                                            <td style="width: 480px; text-align: center; font-family: 'Trebuchet MS'; font-size: 15px;">Emitir relatório
                                                            </td>
                                                        </tr>
                                                    </table>


                                                    <table style="margin-top: 10px;">
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="Label1" runat="server" Text="Data From:"></asp:Label>
                                                                <asp:TextBox ID="txtfromReport" runat="server" Width="100px" MaxLength="10"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
                                                                    ControlToValidate="txtfromReport" ErrorMessage="*"
                                                                    Font-Size="Small" ToolTip="Campo requerido." ValidationGroup="EmitirRelatorio">*</asp:RequiredFieldValidator>
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="Label2" runat="server" Text="Data To:"></asp:Label>
                                                                <asp:TextBox ID="txttoReport" runat="server" Width="100px" MaxLength="10"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
                                                                    ControlToValidate="txttoReport" ErrorMessage="*" Font-Size="Small"
                                                                    ToolTip="Campo requerido." ValidationGroup="EmitirRelatorio">*</asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblPaisReport" runat="server" Text="País:"></asp:Label>                                                                
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlPaisReport" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblCidadeReport" runat="server" Text="Cidade:"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlCidadeReport" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblCambioReport" runat="server" Text="Moeda:"></asp:Label>                                                                
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlCambioReport" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblMercadoReport" runat="server" Text="Mercado:"></asp:Label>                                                                
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlMercadoReport" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblBaseTarifariaReport" runat="server" Text="Base Tarifaria:"></asp:Label>                                                                
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlBaseTarifariaReport" runat="server" />
                                                            </td>
                                                        </tr>
                                                        
                                                        <tr>
                                                            <td>
                                                                <asp:Button ID="btnGerarRelatorioServico" runat="server" CssClass="btnGeralAzul" OnClick="btnGerarRelatorioServico_Click" Text="Imprimir" /><br />
                                                            </td>
                                                        </tr>
                                                    </table>



                                                    
                                                </asp:Panel>











                                                <asp:Panel ID="painelModalRelatorioServicoTarifario" runat="server" CssClass="ModalPopup" Style="display: none; width: auto; height: auto; overflow-x: hidden; overflow-y: auto; border-radius: 5px;">
                                                    <asp:ImageButton ID="btnFecharPainelModalRelatorioServicoTarifario" ToolTip="Fechar" runat="server" ImageUrl="../../images/Icones/close2.png" Width="20px" Height="20px" />
                                                    <table>
                                                        <tr>
                                                            <td style="width: 480px; text-align: center; font-family: 'Trebuchet MS'; font-size: 15px;">Emitir relatório tarifario
                                                            </td>
                                                        </tr>
                                                    </table>


                                                    <table style="margin-top: 10px;">
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblDataFromTarifario" runat="server" Text="Data From:"></asp:Label>
                                                                <asp:TextBox ID="txtfromReportTarifario" runat="server" Width="100px" MaxLength="10"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server"
                                                                    ControlToValidate="txtfromReportTarifario" ErrorMessage="*"
                                                                    Font-Size="Small" ToolTip="Campo requerido." ValidationGroup="EmitirRelatorio">*</asp:RequiredFieldValidator>
                                                            </td>
                                                            <td>
                                                                <asp:Label ID="Label4" runat="server" Text="Data To:"></asp:Label>
                                                                <asp:TextBox ID="txttoReportTarifario" runat="server" Width="100px" MaxLength="10"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server"
                                                                    ControlToValidate="txttoReportTarifario" ErrorMessage="*" Font-Size="Small"
                                                                    ToolTip="Campo requerido." ValidationGroup="EmitirRelatorio">*</asp:RequiredFieldValidator>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="Label5" runat="server" Text="País:"></asp:Label>                                                                
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlPaisReportTarifario" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="Label6" runat="server" Text="Cidade:"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlCidadeRerpotTarifario" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="Label7" runat="server" Text="Moeda:"></asp:Label>                                                                
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlCambioReportTarifario" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="Label8" runat="server" Text="Mercado:"></asp:Label>                                                                
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlMercadoReportTarifario" runat="server" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="Label9" runat="server" Text="Base Tarifaria:"></asp:Label>                                                                
                                                            </td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlBaseTarifariaReportTarifario" runat="server" />
                                                            </td>
                                                        </tr>
                                                        
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="Label3" runat="server" Text="Mark up:"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtMarkUpRelatorioTarifario" runat="server" Width="100px" MaxLength="10"></asp:TextBox>
                                                            </td>
                                                        </tr>

                                                         <tr>
                                                             <td>
                                                                 <asp:Label ID="lblFormatoRelatorio" runat="server" Text="Formato Relatório:"></asp:Label>
                                                             </td>
                                                                <td>                                                                    
                                                                    <asp:DropDownList ID="ddlFormatoReportServicos" runat="server">
                                                                        <asp:ListItem Value="1" Text="PDF" />
                                                                        <asp:ListItem Value="2" Text="Word" />
                                                                        <asp:ListItem Value="3" Text="Excel" />
                                                                    </asp:DropDownList>
                                                                </td>
                                                            </tr>

                                                        <tr>
                                                            <td>
                                                                <asp:Button ID="btnGerarRelatorioServicoTarifario" runat="server" CssClass="btnGeralAzul" OnClick="btnGerarRelatorioServicoTarifario_Click" Text="Imprimir" /><br />
                                                            </td>
                                                        </tr>
                                                    </table>



                                                    
                                                </asp:Panel>

















                                                <asp:ModalPopupExtender
                                                    ID="modalPopupExtenderRelatorioServico"
                                                    runat="server"
                                                    BackgroundCssClass="ModalPopupBG"
                                                    CancelControlID="btnFecharPainelModalRelatorioServico"
                                                    DropShadow="false"
                                                    Enabled="True"
                                                    PopupControlID="painelModalRelatorioServico"
                                                    PopupDragHandleControlID="PopupHeader"
                                                    RepositionMode="RepositionOnWindowResizeAndScroll"
                                                    Drag="true"
                                                    TargetControlID="btnRelatorioServico_fake">
                                                </asp:ModalPopupExtender>


                                                <asp:ModalPopupExtender
                                                    ID="modalPopupExtenderRelatorioServicoTarifario"
                                                    runat="server"
                                                    BackgroundCssClass="ModalPopupBG"
                                                    CancelControlID="btnFecharPainelModalRelatorioServicoTarifario"
                                                    DropShadow="false"
                                                    Enabled="True"
                                                    PopupControlID="painelModalRelatorioServicoTarifario"
                                                    PopupDragHandleControlID="PopupHeader"
                                                    RepositionMode="RepositionOnWindowResizeAndScroll"
                                                    Drag="true"
                                                    TargetControlID="btnRelatorioServicoTarifario_fake">
                                                </asp:ModalPopupExtender>


                                            </div>
                                            <asp:Label ID="lblMsgCadServicos" runat="server" Font-Bold="True"></asp:Label>
                                        </div>

                                    </div>

                                </div>

                                <div class="ServDir">
                                    <asp:Panel ID="PanelbtnsServico" runat="server" Visible="False">
                                        <input id="btnShowAddFotoServico" class="btnGeralAzul" value="Add Fotos" onclick="AbrirPopUp('AddFoto_Servico.aspx', 'Fotos', '790', '390')" type="button" />
                                        <input id="btnShowInfoServico" class="btnGeralAzul" value="Info Serviço" onclick="OpenInfos('InfoServico.aspx')" type="button" />
                                        <asp:Button ID="btnHolidays" runat="server" CssClass="btnGeralAzul" Text="Holidays" />
                                    </asp:Panel>

                                    <asp:Panel ID="PanelHolidays" runat="server" CssClass="ModalPopup" Style="display: none; overflow-x: hidden; overflow-y: auto; border-radius: 5px;" Height="444px" Width="774px">

                                        <asp:ImageButton ID="imgFecharHolidays" ToolTip="Fechar" runat="server" ImageUrl="../../images/Icones/close2.png" Width="20px" Height="20px" />

                                        <fieldset style="height: 400px; width: 739px; border: 1px thin #d9d9d9;">
                                            <legend>
                                                <asp:Label ID="lblHolidayServicoNome" runat="server" Text="" Style="font-size: 15px;" ForeColor="Black" /></legend>

                                            <div style="float: left; height: 198px; width: 130px;">

                                                <fieldset style="height: 185px">
                                                    <legend>
                                                        <asp:Label ID="lblWeekDays" runat="server" Text="Week Days" Style="font-size: 15px;" ForeColor="Red" /></legend>
                                                    <br />
                                                    <asp:CheckBox ID="chkSeg" runat="server" Text="Segunda" /><br />
                                                    <asp:CheckBox ID="chkTer" runat="server" Text="Terça" /><br />
                                                    <asp:CheckBox ID="chkQua" runat="server" Text="Quarta" /><br />
                                                    <asp:CheckBox ID="chkQui" runat="server" Text="Quinta" /><br />
                                                    <asp:CheckBox ID="chkSex" runat="server" Text="Sexta" /><br />
                                                    <asp:CheckBox ID="chkSab" runat="server" Text="Sábado" /><br />
                                                    <asp:CheckBox ID="chkDom" runat="server" Text="Domingo" /><br />

                                                </fieldset>

                                            </div>

                                            <div style="float: left; height: 225px; width: 205px; margin-left: 19px;">

                                                <fieldset style="height: 185px;">
                                                    <legend>
                                                        <asp:Label ID="lblHolidayDates" runat="server" Text="Holidays Dates" Style="font-size: 15px;" ForeColor="Red" /></legend>
                                                    <br />

                                                    <div style="overflow-x: hidden; overflow-y: auto;">
                                                        <asp:GridView ID="GridHolidaysDates" runat="server"
                                                            AutoGenerateColumns="False" CssClass="mGrid"
                                                            GridLines="None" Height="16px" Width="182px"
                                                            ShowFooter="True" EmptyDataText="Não existe dates.">
                                                            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                            <Columns>

                                                                <asp:TemplateField HeaderText="Dates">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblDate" runat="server" Text='<%# string.Format("{0:dd/MM/yyyy}", Eval("Holidays_Dates_data")) %>' />
                                                                    </ItemTemplate>
                                                                    <FooterTemplate>
                                                                        <asp:TextBox ID="txtdata" runat="server" Text="" Width="100px" />
                                                                        <asp:Button ID="btnSalvarDate" runat="server" Text="add" OnCommand="btnSalvarDate_Command" Height="22px" />
                                                                    </FooterTemplate>
                                                                    <HeaderStyle HorizontalAlign="Center" Wrap="False" />
                                                                    <ItemStyle HorizontalAlign="Center" Wrap="False" />
                                                                </asp:TemplateField>

                                                                <asp:TemplateField>
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton ID="ExluirHolidaysDates" ToolTip="Excluir Date"
                                                                            runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Holidays_Dates_id") %>'
                                                                            OnCommand="ExluirHolidaysDates_Command"
                                                                            ImageUrl="~/images/Icones/delete.png" />
                                                                    </ItemTemplate>
                                                                    <HeaderStyle Wrap="False" />
                                                                    <ItemStyle Wrap="False" />
                                                                </asp:TemplateField>

                                                            </Columns>

                                                            <EmptyDataTemplate>
                                                                <asp:TextBox ID="txtdataFooter" runat="server" Text="" Width="100px" />
                                                                <asp:Button ID="btnSalvarDate" runat="server" Text="add" OnCommand="btnSalvarDate_Command" Height="22px" />
                                                            </EmptyDataTemplate>

                                                            <PagerStyle CssClass="pgr" />
                                                        </asp:GridView>
                                                    </div>

                                                </fieldset>

                                            </div>

                                            <div style="float: left; height: 226px; width: 307px; margin-left: 31px;">

                                                <fieldset style="height: 185px;">
                                                    <legend>
                                                        <asp:Label ID="lblHolidayPeriods" runat="server" Text="Holidays Períodos" Style="font-size: 15px;" ForeColor="Red" /></legend>
                                                    <br />

                                                    <div style="overflow-x: hidden; overflow-y: auto;">

                                                        <asp:GridView ID="GridHolidaysPeriods" runat="server"
                                                            AutoGenerateColumns="False" CssClass="mGrid"
                                                            EmptyDataText="Não existe período cadastrado."
                                                            GridLines="None" Height="16px" Width="296px"
                                                            ShowFooter="True">
                                                            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                            <Columns>

                                                                <asp:TemplateField HeaderText="From">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblDateFrom" runat="server" Text='<%# string.Format("{0:dd/MM/yyyy}", Eval("HoliDays_Periodo_from")) %>' />
                                                                    </ItemTemplate>
                                                                    <FooterTemplate>
                                                                        <asp:TextBox ID="txtdataFrom" runat="server" Text="" Width="100px" />
                                                                    </FooterTemplate>
                                                                    <HeaderStyle HorizontalAlign="Center" Wrap="False" />
                                                                    <ItemStyle HorizontalAlign="Center" Wrap="False" />
                                                                </asp:TemplateField>

                                                                <asp:TemplateField HeaderText="To">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblDateTo" runat="server" Text='<%# string.Format("{0:dd/MM/yyyy}", Eval("HoliDays_Periodo_to")) %>' />
                                                                    </ItemTemplate>
                                                                    <FooterTemplate>
                                                                        <asp:TextBox ID="txtdataTo" runat="server" Text="" Width="100px" />
                                                                        <asp:Button ID="btnSalvarPeriods" runat="server" Text="add" OnCommand="btnSalvarPeriods_Command" Height="22px" />
                                                                    </FooterTemplate>
                                                                    <HeaderStyle HorizontalAlign="Center" Wrap="False" />
                                                                    <ItemStyle HorizontalAlign="Center" Wrap="False" />
                                                                </asp:TemplateField>

                                                                <asp:TemplateField>
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton ID="ExluirHolidaysPeriodo" ToolTip="Excluir Periodo"
                                                                            runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "HoliDays_Periodo_id") %>'
                                                                            OnCommand="ExluirHolidaysPeriodo_Command"
                                                                            ImageUrl="~/images/Icones/delete.png" />
                                                                    </ItemTemplate>
                                                                    <HeaderStyle Wrap="False" />
                                                                    <ItemStyle Wrap="False" />
                                                                </asp:TemplateField>

                                                            </Columns>

                                                            <EmptyDataTemplate>
                                                                <asp:TextBox ID="txtdataFromFooter" runat="server" Text="" Width="100px" />
                                                                <asp:TextBox ID="txtdataToFooter" runat="server" Text="" Width="100px" />
                                                                <asp:Button ID="btnSalvarPeriods" runat="server" Text="add" OnCommand="btnSalvarPeriods_Command" Height="22px" />
                                                            </EmptyDataTemplate>

                                                            <PagerStyle CssClass="pgr" />
                                                        </asp:GridView>

                                                    </div>

                                                </fieldset>
                                            </div>

                                            <div style="float: left; height: 130px; width: 307px; margin-left: 0px;">

                                                <fieldset style="height: 117px;">
                                                    <legend>
                                                        <asp:Label ID="lblRemarkHolidays" runat="server" Text="Remarks" Style="font-size: 15px;" ForeColor="Red" /></legend>
                                                    <br />

                                                    <asp:TextBox ID="txtRemarkHolidays" runat="server" TextMode="MultiLine" Width="238px" Height="70px" />

                                                </fieldset>

                                            </div>

                                            <div style="float: left; height: 130px; width: 307px; margin-left: 14px; margin-top: 17px;">
                                                <asp:Button ID="btnSalvarHolidays" runat="server" Text="Salvar" CssClass="btnGeralAzul" OnClick="btnSalvarHolidays_Click" />
                                            </div>

                                        </fieldset>

                                    </asp:Panel>

                                    <asp:ModalPopupExtender
                                        ID="ModalPopupExtenderHolidays"
                                        runat="server"
                                        BackgroundCssClass="ModalPopupBG"
                                        CancelControlID="imgFecharHolidays"
                                        DropShadow="false"
                                        Enabled="True"
                                        PopupControlID="PanelHolidays"
                                        PopupDragHandleControlID="PopupHeader"
                                        RepositionMode="RepositionOnWindowResizeAndScroll"
                                        Drag="true"
                                        TargetControlID="btnHolidays">
                                    </asp:ModalPopupExtender>

                                    <br />
                                    <br />
                                    <br />
                                    <asp:TabContainer ID="TabContainerInfos" runat="server" Width="852px" Height="330px" ActiveTabIndex="0" BorderWidth="0px" BorderStyle="None">
                                        <asp:TabPanel ID="TabInfoLong" runat="server" HeaderText="Descrição">
                                            <ContentTemplate>
                                                <div class="InfoLongServico">
                                                    <cc1:Editor ID="EditorInfoLongServicos" runat="server" NoUnicode="true" AutoFocus="false" />
                                                </div>
                                            </ContentTemplate>
                                        </asp:TabPanel>
                                        <asp:TabPanel ID="TabInfoShort" runat="server" HeaderText="Descrição Curta">
                                            <ContentTemplate>
                                                <div class="InfoShortServico">
                                                    <cc1:Editor ID="EditorInfoShortServicos" runat="server" NoUnicode="true" />
                                                </div>
                                            </ContentTemplate>
                                        </asp:TabPanel>
                                        <asp:TabPanel ID="TabOperador" runat="server" HeaderText="Observação">
                                            <ContentTemplate>
                                                <div id="Operador">
                                                    <div class="addInfoOperador">
                                                        <asp:Label ID="lblRemarksServicosTXT" runat="server" Text="Remarks" /><br />
                                                        <asp:TextBox ID="txtremarks" runat="server" Height="180px" TextMode="MultiLine"
                                                            Width="360px" />
                                                    </div>
                                                    <div class="AddInfoCliente">
                                                        <asp:Label ID="lblInfoClienteServicosTXT" runat="server" Text="Infos do Cliente" /><br />
                                                        <asp:TextBox ID="txtInfoCliente" runat="server" Height="180px" TextMode="MultiLine"
                                                            Width="430px" />
                                                    </div>
                                                    <div class="AddInfoVoucher">
                                                        <asp:Label ID="lblInfoVoucherServicosTXT" runat="server" Text="Infos do Voucher" /><br />
                                                        <asp:TextBox ID="txtInfoVoucher" runat="server" Height="85px" TextMode="MultiLine"
                                                            Width="811px" />
                                                    </div>
                                                </div>
                                            </ContentTemplate>
                                        </asp:TabPanel>
                                    </asp:TabContainer>
                                </div>

                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>


                <div id="tabs-2">

                    <asp:UpdatePanel ID="UpdatePanelServicoSozinho" runat="server">
                        <ContentTemplate>
                            <div id="TarifasServico">
                                <div class="MServicoSozinhoFormEsq">
                                    <fieldset class="SetMServicoSupplier">
                                        <legend>
                                            <asp:Label ID="lblNomeServicoSS" runat="server" Style="font-size: 15px;" ForeColor="Red" />
                                            - 
                                                <asp:Label ID="lblNomeCidadeSS" runat="server" Style="font-size: 15px;" ForeColor="Red" />
                                        </legend>
                                        <div class="MServicoSuppliers radius">
                                            <asp:TextBox ID="txtCodMServicoSozinho" runat="server" Visible="false" /><div class="filtro_nomeSupplier">
                                                <asp:Label ID="lblTituloSupplierSS" runat="server" Text="Supplier" /><br />
                                                <asp:TextBox ID="txtSupplierMontaServico" runat="server" MaxLength="50" placeholder="Informe o nome do supplier." Width="340px"></asp:TextBox><img id="processing3" alt="load" src="../../images/ajax-loader.gif" style="visibility: hidden" />
                                            </div>
                                            <div class="filtro_nomeSupplier_btns">
                                                <input id="btnListaServSozinho" class="btnGeralAzul" onclick="AbrirPopUp('ListaSupplierPorServico.aspx?Tipo=servico', 'Periodo', '570', '490')" type="button" value="List" />
                                            </div>
                                            <asp:AutoCompleteExtender
                                                ID="AutoCompleteExtenderSupplierMontaServico"
                                                runat="server"
                                                CompletionInterval="100"
                                                DelimiterCharacters=""
                                                EnableCaching="False"
                                                Enabled="True"
                                                MinimumPrefixLength="1"
                                                OnClientPopulated="ShowIcon3"
                                                OnClientPopulating="ShowIcon3"
                                                OnClientItemSelected="CallServerMontaServico"
                                                ServiceMethod="SearchSuppliers"
                                                ServicePath=""
                                                TargetControlID="txtSupplierMontaServico">
                                            </asp:AutoCompleteExtender>
                                            <asp:Button ID="btnFiltroNomeMontaServicoSupplier" runat="server" OnClick="btnFiltroNomeMontaServicoSupplier_Click" Style="display: none"></asp:Button><div class="FromDatas">
                                                <div class="dataFrom">
                                                    <asp:Label ID="lblFrom" runat="server" Text="Data From:"></asp:Label><br />
                                                    <asp:TextBox ID="from" runat="server" Width="100px" MaxLength="10"></asp:TextBox><asp:RequiredFieldValidator ID="RqDataFrom" runat="server"
                                                        ControlToValidate="from" ErrorMessage="*"
                                                        ToolTip="Campo requerido." CssClass="MsgErro" ValidationGroup="SalvarBases">*</asp:RequiredFieldValidator>
                                                </div>
                                                <div class="dataTo">
                                                    <asp:Label ID="lblTo" runat="server" Text="Data To:"></asp:Label><br />
                                                    <asp:TextBox ID="to" runat="server" Width="100px" MaxLength="10"></asp:TextBox><asp:RequiredFieldValidator ID="RqDataTo" runat="server"
                                                        ControlToValidate="to" ErrorMessage="*"
                                                        ToolTip="Campo requerido." CssClass="MsgErro" ValidationGroup="SalvarBases">*</asp:RequiredFieldValidator>
                                                </div>
                                            </div>
                                            <div class="FormTipoServico">
                                                <div class="FormTipoServico_tiposervico">
                                                    <asp:Label ID="lblTipoServicoMServicoTXT" runat="server" Text="Tipo Serviço:"></asp:Label><br />
                                                    <asp:DropDownList ID="ddlTipoServico2" Enabled="false" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlTipoServico2_SelectedIndexChanged"></asp:DropDownList>
                                                </div>
                                                <div class="FormTipoServico_categoria">
                                                    <asp:Label ID="lblTipoServicoCategMServicoTXT" runat="server" Text="Categoria:"></asp:Label><br />
                                                    <asp:DropDownList ID="ddlTipoServicoCateg2" Enabled="false" runat="server"></asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="FormMoeda_Obs">
                                                <div class="FormMoeda_Obs_obs">
                                                    <asp:Label ID="lblObsMServicoTXT" runat="server" Text="Observação:"></asp:Label><br />
                                                    <asp:TextBox ID="txtObs" runat="server" TextMode="MultiLine" MaxLength="100" Width="348px" />
                                                </div>
                                            </div>
                                            <div class="FormTipoServico">
                                                <asp:Label ID="lblBasesIndex" runat="server" Text="Bases:" /><br />
                                                <asp:RadioButtonList ID="rdoBasesIndex" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rdoBasesIndex_SelectedIndexChanged" RepeatDirection="Horizontal">
                                                    <asp:ListItem Selected="True" Text="Base Principal" Value="1" />
                                                    <asp:ListItem Text="Base 2" Value="2" />
                                                    <asp:ListItem Text="Base 3" Value="3" />
                                                </asp:RadioButtonList>
                                            </div>
                                            <asp:Label ID="lblMsgCadMServicos" runat="server" CssClass="MsgErro"></asp:Label>
                                        </div>
                                    </fieldset>
                                </div>
                                <div class="MServicoSozinhoFormDir">
                                    <fieldset class="SetMServicoBase">
                                        <legend>
                                            <h3 style="margin-bottom: 0px">Base</h3>
                                        </legend>
                                        <asp:Panel ID="PanelGridMServicoSozinho" Visible="False" runat="server" Width="704px" Height="505px">
                                            <div class="GridMServico_Filtro">
                                                <div class="bases_filtros">
                                                    <div class="bases_filtros_drops">
                                                        <asp:Label ID="lblMercadoFiltro_BaseTXT" runat="server" Text="Mercado:" /><br />
                                                        <asp:DropDownList ID="ddlMercadoFiltro_Base" AutoPostBack="True" runat="server" OnSelectedIndexChanged="ddlMercadoFiltro_Base_SelectedIndexChanged"></asp:DropDownList>
                                                    </div>
                                                    <div class="bases_filtros_drops">
                                                        <asp:Label ID="lblBaseTarifariaFiltro_BaseTXT" runat="server" Text="Base Tarifária:" /><br />
                                                        <asp:DropDownList ID="ddlBaseTarifariaFiltro_Base" AutoPostBack="True" runat="server" OnSelectedIndexChanged="ddlBaseTarifariaFiltro_Base_SelectedIndexChanged"></asp:DropDownList>
                                                    </div>
                                                    <div class="bases_filtros_drops">
                                                        <asp:Label ID="lblTipoBase_Base" runat="server" Text="Tipo de Base:" /><br />
                                                        <asp:DropDownList ID="ddlTipoBase_Base" AutoPostBack="True" runat="server" OnSelectedIndexChanged="ddlTipoBase_Base_SelectedIndexChanged"></asp:DropDownList>
                                                    </div>
                                                    <div class="bases_filtros_drops">
                                                        <asp:Label ID="lblMoedaFiltro_BaseTXT" runat="server" Text="Moeda:" /><br />
                                                        <asp:DropDownList ID="ddlMoedaFiltro_Base" AutoPostBack="True" runat="server" OnSelectedIndexChanged="ddlMoedaFiltro_Base_SelectedIndexChanged"></asp:DropDownList>
                                                    </div>
                                                    <div class="bases_filtros_box">
                                                        <asp:Label ID="lblPorcetagemTarifaTXT" runat="server" Text="Taxas:"></asp:Label><asp:TextBox ID="txtPorcentagemTaxa" runat="server" Width="50px">0</asp:TextBox>%
                                                            <asp:TextBox ID="txtPorcentagemImposto1" runat="server" Width="50px">0</asp:TextBox>%
                                                            <asp:Label ID="lblComissaoTXT" runat="server" Text="Comissão:"></asp:Label>
                                                        <asp:TextBox ID="txtComissao" runat="server" Text="0" Width="50px" />%
                                                        
                                                        <asp:ImageButton ID="OpenCalc" runat="server" ImageUrl="../../images/Icones/calc2S.png" ToolTip="Acréscimo/Decréscimo de valor e/ou percentual." />

                                                        <asp:Panel ID="PanelCalcSS" runat="server" CssClass="ModalPopup" Style="display: none; width: auto; height: auto; overflow-x: auto; overflow-y: auto; border-radius: 5px;">

                                                            <asp:ImageButton ID="btnImgFecharModalCalcSS" ToolTip="Fechar" runat="server" ImageUrl="../../images/Icones/close2.png" Width="20px" Height="20px" />

                                                            Valor:
                                                        <asp:TextBox ID="txtValorAdicional" runat="server" Text="0" Width="50px" />

                                                            Percent:
                                                        <asp:TextBox ID="txtPercentValorAdicional" runat="server" Text="0" Width="50px" />

                                                            <asp:CheckBox ID="chkPercentValorSS" runat="server" Text="Adicionar?" AutoPostBack="true" OnCheckedChanged="chkPercentValorSS_CheckedChanged" />
                                                        </asp:Panel>

                                                        <asp:ModalPopupExtender ID="ModalPopupExtenderAddCategoria" runat="server" BackgroundCssClass="ModalPopupBG" CancelControlID="btnImgFecharModalCalcSS"
                                                            DropShadow="false" Enabled="True" PopupControlID="PanelCalcSS" PopupDragHandleControlID="PopupHeader" RepositionMode="RepositionOnWindowResizeAndScroll"
                                                            Drag="true" TargetControlID="OpenCalc">
                                                        </asp:ModalPopupExtender>


                                                        <asp:ImageButton ID="btnImgAtualizarTaxas" runat="server" ImageUrl="~/images/Icones/refresh-icon.png" OnClick="btnImgAtualizarTaxas_Click" ToolTip="Visualizar tarifas com as taxas." />

                                                    </div>
                                                    <div class="bases_filtros_box">
                                                        <asp:Button ID="btnSalvarTarifas" runat="server" CssClass="btnGeralAzul" OnClick="SalvarTarifas" Text="Salvar" ValidationGroup="SalvarBases" />
                                                        <asp:Button ID="btnAtualizarTarifas" runat="server" CssClass="btnGeralAzul" OnClick="AtualizarTarifas" Text="Atualizar" ValidationGroup="SalvarBases" Visible="False" />
                                                        <asp:Button ID="btnVerMServicoCadastrados" runat="server" CssClass="btnGeralAzul" Text="Tarifas Cadastradas" Visible="False" />
                                                        <asp:Button ID="btnCopiarMServicoSozinho" runat="server" CssClass="btnGeralAzul" Text="Copiar Serviço" Visible="False" />
                                                    </div>

                                                    <asp:Panel ID="PanelMServicoSozinho" runat="server" CssClass="ModalPopup" Style="display: none; width: auto; height: 300px; overflow-x: hidden; overflow-y: auto; border-radius: 5px;">

                                                        <asp:ImageButton ID="btnImgFecharModalMServicoSozinho" ToolTip="Fechar" runat="server" ImageUrl="../../images/Icones/close2.png" Width="20px" Height="20px" />

                                                        <asp:GridView ID="GridMServicosSozinhoCadastrados" runat="server"
                                                            AutoGenerateColumns="False" GridLines="None" CssClass="mGrid" EmptyDataText="Não existe Serviços para esse Supplier."
                                                            Height="16px"
                                                            Width="94px">
                                                            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                            <Columns>
                                                                <asp:BoundField DataField="IdMServico" HeaderText="ID" ReadOnly="True"
                                                                    SortExpression="IdMServico" InsertVisible="False">
                                                                    <FooterStyle CssClass="invisible" />
                                                                    <HeaderStyle CssClass="invisible" />
                                                                    <ItemStyle CssClass="invisible" />
                                                                </asp:BoundField>
                                                                <asp:BoundField DataField="MServico_DataFrom" HeaderText="Data To" DataFormatString="{0:dd/MM/yyyy}" />
                                                                <asp:BoundField DataField="MServico_DataTo" HeaderText="Data To" DataFormatString="{0:dd/MM/yyyy}" />
                                                                <asp:BoundField DataField="Tipo_categ_nome" HeaderText="Categoria" />
                                                                <asp:BoundField DataField="Mercado_nome" HeaderText="Mercado" />
                                                                <asp:BoundField DataField="MServico_Obs" HeaderText="Obs" />
                                                                <asp:TemplateField>
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton ID="EditarMServico" ToolTip="Editar Serviço"
                                                                            runat="server" ImageUrl="~/images/Icones/edit.png"
                                                                            CommandArgument='<%# string.Format("{0},{1},{2},{3},{4}", Eval("IdMServico"), Eval("Mercado_id"), Eval("BaseTarifaria_id"), Eval("TipoBase_id"), Eval("Moeda_id")) %>'
                                                                            OnCommand="EditarMServico" />
                                                                    </ItemTemplate>
                                                                    <HeaderStyle Wrap="False" />
                                                                    <ItemStyle Wrap="False" />
                                                                </asp:TemplateField>
                                                                <asp:TemplateField>
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton ID="ExluirMServico" ToolTip="Excluir Serviço"
                                                                            runat="server" CommandArgument='<%# Eval("IdMServico") %>'
                                                                            OnCommand="ExcluirMServico" OnClientClick="return confirm('Excluindo esse serviço, todas as tarifas do mesmo também serão excluídas. Confirma?');"
                                                                            ImageUrl="~/images/Icones/delete.png" />
                                                                    </ItemTemplate>
                                                                    <HeaderStyle Wrap="False" />
                                                                    <ItemStyle Wrap="False" />
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <PagerStyle CssClass="pgr"></PagerStyle>
                                                        </asp:GridView>

                                                    </asp:Panel>

                                                    <asp:ModalPopupExtender
                                                        ID="ModalPopupExtenderMServicoSozinho"
                                                        runat="server"
                                                        BackgroundCssClass="ModalPopupBG"
                                                        CancelControlID="btnImgFecharModalMServicoSozinho"
                                                        DropShadow="false"
                                                        Enabled="True"
                                                        PopupControlID="PanelMServicoSozinho"
                                                        PopupDragHandleControlID="PopupHeader"
                                                        RepositionMode="RepositionOnWindowResizeAndScroll"
                                                        Drag="true"
                                                        TargetControlID="btnVerMServicoCadastrados">
                                                    </asp:ModalPopupExtender>

                                                    <asp:Panel ID="PanelMServicoSozinhoCopiar" runat="server" CssClass="ModalPopup" Style="display: none; width: auto; height: 300px; overflow-x: hidden; overflow-y: auto; border-radius: 5px;">

                                                        <asp:ImageButton ID="btnImgFecharModalCopiarMServicoSozinho" ToolTip="Fechar" runat="server" ImageUrl="../../images/Icones/close2.png" Width="20px" Height="20px" />

                                                        <table cellspacing="0" cellpadding="0" style="border: none;">
                                                            <tr style="height: 50px;">
                                                                <td>
                                                                    <asp:Label ID="lblPeriodoTXT" runat="server" ForeColor="#666666" Text="Período:" Width="100px"></asp:Label><br />
                                                                    <asp:DropDownList ID="ddlPeriodosMServicoSozinho" DataTextFormatString="{0:dd/MM/yyyy}" runat="server">
                                                                    </asp:DropDownList>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 50px;">
                                                                <td>
                                                                    <asp:Label ID="lblDataFromCopiarMServSozinhoTXT" runat="server" ForeColor="#666666" Text="Data From:"></asp:Label><br />
                                                                    <asp:TextBox ID="txtPeriodoFromCopiarMServSozinho" runat="Server" Width="100px" MaxLength="10"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                                                        ControlToValidate="txtPeriodoFromCopiarMServSozinho" ErrorMessage="*" ValidationGroup="CopiarMServicoSozinho" CssClass="MsgErro"
                                                                        ToolTip="Campo requerido"></asp:RequiredFieldValidator>
                                                                    <br />
                                                                </td>
                                                                <td>
                                                                    <asp:Label ID="lblDataToCopiarMServSozinhoTXT" runat="server" ForeColor="#666666" Text="Data To:"></asp:Label><br />
                                                                    <asp:TextBox ID="txtPeriodoToCopiarMServSozinho" runat="Server"
                                                                        MaxLength="10" Width="100px"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                                                                        ControlToValidate="txtPeriodoToCopiarMServSozinho" ErrorMessage="*" ValidationGroup="CopiarMServicoSozinho" CssClass="MsgErro"
                                                                        ToolTip="Campo requerido"></asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 50px;">
                                                                <td>
                                                                    <asp:TextBox ID="txtPercentCopiarMServicoSozinho" runat="server" Width="50" placeholder="Percent" MaxLength="5" />%
                                                                </td>
                                                            </tr>
                                                            <tr style="height: 50px;">
                                                                <td>
                                                                    <asp:Button ID="btnSalvarMServicoSozinho" runat="server" CssClass="btnGeralAzul" OnClick="CopiarMServicoSozinho" Text="Salvar" ValidationGroup="CopiarMServicoSozinho" />
                                                                </td>
                                                            </tr>
                                                        </table>

                                                    </asp:Panel>

                                                    <asp:ModalPopupExtender
                                                        ID="ModalPopupExtenderModalCopiarMServicoSozinho"
                                                        runat="server"
                                                        BackgroundCssClass="ModalPopupBG"
                                                        CancelControlID="btnImgFecharModalCopiarMServicoSozinho"
                                                        DropShadow="false"
                                                        Enabled="True"
                                                        PopupControlID="PanelMServicoSozinhoCopiar"
                                                        PopupDragHandleControlID="PopupHeader"
                                                        RepositionMode="RepositionOnWindowResizeAndScroll"
                                                        Drag="true"
                                                        TargetControlID="btnCopiarMServicoSozinho">
                                                    </asp:ModalPopupExtender>

                                                </div>

                                                <div class="GridBaseServicoSozinho">

                                                    <asp:GridView ID="GridBaseSupplierServicoSozinho" runat="server"
                                                        AutoGenerateColumns="False" CssClass="mGrid"
                                                        EmptyDataText="Não existe base para este supplier."
                                                        GridLines="None" Height="16px" Width="16px">
                                                        <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                        <Columns>
                                                            <asp:BoundField DataField="Base_de" HeaderText="De" SortExpression="Base_de"></asp:BoundField>
                                                            <asp:BoundField DataField="Base_ate" HeaderText="Para" SortExpression="Base_ate"></asp:BoundField>

                                                            <asp:TemplateField HeaderText="Tipo Cadastro">
                                                                <ItemTemplate>

                                                                    <asp:DropDownList ID="ddlTipoCadastro" runat="server" AutoPostBack="true" OnSelectedIndexChanged="MudaTipoCadastroServSoz">

                                                                        <asp:ListItem Selected="True" Value="0" Text="Valor"></asp:ListItem>
                                                                        <asp:ListItem Value="1" Text="Status"></asp:ListItem>

                                                                    </asp:DropDownList>

                                                                </ItemTemplate>
                                                                <HeaderStyle Wrap="False" />
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Preço Total">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="txtValorServicoSozinho" runat="server" Width="50px" Height="10px" MaxLength="10" TabIndex="1" />
                                                                    <asp:Label ID="lblValorServicoSozinhoTotal" runat="server" Text="" />
                                                                    <asp:Label ID="lblIDValores" runat="server" Visible="false" />

                                                                    <asp:DropDownList ID="ddlStatusTarifa" runat="server" Visible="false" />
                                                                </ItemTemplate>
                                                                <HeaderStyle Wrap="False" />
                                                                <ItemStyle Wrap="False" />
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Valor Venda">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="txtValorServicoSozinhoVenda" runat="server" Width="50px" Height="10px" MaxLength="10" TabIndex="2" />
                                                                </ItemTemplate>
                                                                <HeaderStyle Wrap="False" />
                                                                <ItemStyle Wrap="False" />
                                                            </asp:TemplateField>

                                                            <asp:BoundField DataField="Base_id" HeaderText="ID" SortExpression="Base_id">
                                                                <FooterStyle CssClass="invisible" />
                                                                <HeaderStyle CssClass="invisible" />
                                                                <ItemStyle CssClass="invisible" />
                                                            </asp:BoundField>

                                                        </Columns>
                                                        <PagerStyle CssClass="pgr"></PagerStyle>
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </fieldset>
                                </div>
                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>


                <div id="tabs-3">

                    <asp:UpdatePanel ID="UpdatePanelGridSubServico" runat="server">
                        <ContentTemplate>

                            <div id="TarifasForm">

                                <script type="text/javascript">
                                    Sys.Application.add_load(jScript);
                                </script>
                                <div class="MServicoFormEsq">
                                    <fieldset class="SetMServicoSupplier">
                                        <legend>
                                            <asp:Label ID="lblNomeServicoSUBS" runat="server" Style="font-size: 15px;" ForeColor="Red" />
                                            - 
                                            <asp:Label ID="lblNomeCidadeSUBS" runat="server" Style="font-size: 15px;" ForeColor="Red" />
                                        </legend>
                                        <div class="MServicoSuppliers radius">
                                            <div class="MServicoSuppliers_into">
                                                <div class="filtro_nomeSupplier">
                                                    <asp:TextBox ID="txtSupplier" runat="server" MaxLength="50" placeholder="Informe o nome do supplier." Width="340px"></asp:TextBox>
                                                </div>

                                                <div class="filtro_nomeSupplier_btns">
                                                    <input id="Button1" class="btnGeralAzul" onclick="AbrirPopUp('ListaSupplierPorServico.aspx?Tipo=subservico', 'Periodo', '570', '490')" type="button" value="List" />
                                                </div>

                                                <asp:AutoCompleteExtender
                                                    ID="AutoCompleteExtenderSupplier"
                                                    runat="server" CompletionInterval="100"
                                                    DelimiterCharacters="" EnableCaching="False"
                                                    Enabled="True" MinimumPrefixLength="1" OnClientItemSelected="CallServerServico"
                                                    OnClientPopulated="ShowIcon2" OnClientPopulating="ShowIcon2"
                                                    ServiceMethod="SearchSuppliers" ServicePath="" TargetControlID="txtSupplier">
                                                </asp:AutoCompleteExtender>
                                                <img id="processing2" alt="load" src="../../images/ajax-loader.gif" style="visibility: hidden" />
                                                <asp:Button ID="btnFiltroNomeSupplier" runat="server" OnClick="btnFiltroNomeSupplier_Click" Style="display: none"></asp:Button>

                                            </div>
                                            <asp:Panel ID="PanelSubServicos" runat="server" Visible="false">
                                                <br />
                                                <div class="FromDatas">
                                                    <div class="dataFrom">
                                                        <asp:Label ID="lblDataFromSubServicoTXT" runat="server" Text="Data From:"></asp:Label><br />
                                                        <asp:TextBox ID="txtDataFromSubServico" runat="server" Width="100px" MaxLength="10"></asp:TextBox><asp:RequiredFieldValidator
                                                            ID="DataFromSubServico"
                                                            runat="server"
                                                            ErrorMessage="*"
                                                            CssClass="MsgErro"
                                                            ToolTip="Campo requerido."
                                                            ControlToValidate="txtDataFromSubServico" ValidationGroup="SalvarSubServico" />
                                                    </div>
                                                    <div class="dataTo">
                                                        <asp:Label ID="lblDataToSubServicoTXT" runat="server" Text="Data To:"></asp:Label><br />
                                                        <asp:TextBox ID="txtDataToSubServico" runat="server" Width="100px" MaxLength="10"></asp:TextBox><asp:RequiredFieldValidator
                                                            ID="DataToSubServico"
                                                            runat="server"
                                                            ErrorMessage="*"
                                                            CssClass="MsgErro"
                                                            ToolTip="Campo requerido."
                                                            ControlToValidate="txtDataToSubServico" ValidationGroup="SalvarSubServico" />
                                                    </div>
                                                </div>
                                                <%--<div class="FormTipoServico">
                                                    <div class="FormTipoServico_tiposervico">
                                                        <asp:Label ID="lblTipoServico3" runat="server" Text="Tipo Serviço:"></asp:Label><br />
                                                        <asp:DropDownList ID="ddlTipoServico3" runat="server" Width="100px"></asp:DropDownList>
                                                        <asp:Label ID="lblItemSubServico" runat="server" Text="Item SubServiço:"></asp:Label><br />
                                                        <asp:DropDownList ID="ddlItemSubServico" runat="server" Width="100px"></asp:DropDownList>                                                        
                                                    </div>
                                                    <div class="FormTipoServico_tiposervico">
                                                        <asp:Label ID="lblSubItem" runat="server" Text="SubItem:"></asp:Label><br />
                                                        <asp:DropDownList ID="ddlSubItem" runat="server" Width="100px"></asp:DropDownList>
                                                    </div>
                                                </div>--%>
                                                <div class="FormTipoServico">
                                                    <asp:Label ID="lblBasesSubServicosRDO" runat="server" Text="Bases:" /><br />
                                                    <asp:RadioButtonList ID="rdoBasesIndexSubServico" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="rdoBasesSubServicoIndex_SelectedIndexChanged">
                                                        <asp:ListItem Value="1" Selected="True" Text="Base Principal" />
                                                        <asp:ListItem Value="2" Text="Base 2" />
                                                        <asp:ListItem Value="3" Text="Base 3" />
                                                    </asp:RadioButtonList>
                                                </div>
                                                <div class="AddSubServico">
                                                    <asp:Button ID="btnOpenAddSubServicos" runat="server" Text="Add Sub Serviço" CssClass="btnGeralAzul" OnClick="btnOpenAddSubServicos_Click" Visible="False" /><asp:ImageButton ID="imgRefresh" runat="server" ImageUrl="~/images/Icones/refresh-icon.png" ToolTip="Atualizar Sub Serviço" OnClick="imgRefresh_Click" Visible="False" />
                                                </div>
                                                <div class="AddServicosSuppliers">
                                                    <asp:GridView ID="GridSubServAdicionados"
                                                        runat="server"
                                                        AutoGenerateColumns="False"
                                                        CssClass="mGrid"
                                                        EmptyDataText="Não existe serviços adicionados."
                                                        GridLines="None"
                                                        Height="16px"
                                                        Width="204px">
                                                        <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                        <Columns>

                                                            <asp:TemplateField HeaderText="Serviço">
                                                                <ItemTemplate><span style="font-weight: bold"><%# DataBinder.Eval(Container.DataItem, "Monta_Servico.ItemSubServico.ItemSubServico_nome") %></span>- <%# DataBinder.Eval(Container.DataItem, "Monta_Servico.SubItem.SubItem_nome") %></ItemTemplate>
                                                                <ItemStyle Wrap="False" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Nome Fantasia">
                                                                <ItemTemplate>
                                                                    <%# Limit(DataBinder.Eval(Container.DataItem, "Monta_Servico.Supplier.S_nome"), 15) %>
                                                                    <br />
                                                                    <asp:Label ID="lblIdSupplier" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Monta_Servico.Supplier.S_id") %>' Visible="false" />
                                                                    <asp:Label ID="lblIdMServico" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Monta_Servico.IdMServico") %>' Visible="false" />
                                                                </ItemTemplate>
                                                                <HeaderStyle Wrap="False" />
                                                                <ItemStyle Wrap="False" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="De">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="txtDe" runat="server" MaxLength="10" Width="20px" Text='<%# DataBinder.Eval(Container.DataItem, "ServicoCompleto_de") %>' ViewStateMode="Enabled" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Para">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="txtPara" runat="server" MaxLength="10" Width="20px" Text='<%# DataBinder.Eval(Container.DataItem, "ServicoCompleto_ate") %>' ViewStateMode="Enabled" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="ServicoCompleto_id" HeaderText="ID" SortExpression="ServicoCompleto_id">
                                                                <FooterStyle CssClass="invisible" />
                                                                <HeaderStyle CssClass="invisible" />
                                                                <ItemStyle CssClass="invisible" />
                                                            </asp:BoundField>

                                                            <asp:TemplateField HeaderText="Base">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblIndex" runat="server" Text='<%# Eval("Base_Index") %>' />
                                                                </ItemTemplate>
                                                                <ItemStyle HorizontalAlign="Center" />
                                                            </asp:TemplateField>

                                                            <asp:TemplateField>
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="ExluirServCompleto" ToolTip="Excluir Periodo"
                                                                        runat="server" CommandArgument='<%# string.Format("{0},{1}", Eval("Monta_Servico.IdMServico"), Eval("Base_Index")) %>'
                                                                        OnCommand="ExluirServCompleto"
                                                                        ImageUrl="~/images/Icones/delete.png" />
                                                                </ItemTemplate>
                                                                <HeaderStyle Wrap="False" />
                                                                <ItemStyle Wrap="False" />
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <PagerStyle CssClass="pgr"></PagerStyle>
                                                    </asp:GridView>
                                                </div>
                                                <asp:Button ID="btnCalculaServico" runat="server" Text="Calcular" CssClass="btnGeralAzul" OnClick="btnCalculaServico_Click" Visible="False" />
                                                <asp:Button ID="btnNovaTemporadaSubServico" runat="server" Text="Nova Temporada" CssClass="btnGeralAzul" OnClick="btnNovaTemporadaSubServico_Click" ValidationGroup="SalvarSubServico" />
                                                <asp:Button ID="btnCopiarTemporadaSubServ" runat="server" Text="Copiar" CssClass="btnGeralAzul" Visible="false" />
                                                <asp:Button ID="btnTemporadasCadastradas" runat="server" Text="Cadastradas" CssClass="btnGeralAzul" Visible="False" OnClick="btnTemporadasCadastradas_Click" />
                                            </asp:Panel>
                                        </div>
                                    </fieldset>
                                </div>

                                <asp:Panel ID="PanelCopiarTempoSubServ" runat="server" CssClass="ModalPopup" Style="display: none; width: auto; height: 180px; overflow-x: hidden; overflow-y: auto; border-radius: 5px;">

                                    <asp:ImageButton ID="imgFecharTempoSubServ" ToolTip="Fechar" runat="server" ImageUrl="../../images/Icones/close2.png" Width="20px" Height="20px" />

                                    <table cellspacing="0" cellpadding="0" style="border: none;">
                                        <tr style="height: 50px;">
                                            <td>
                                                <asp:Label ID="lblTempoParaCopiarSubServ" runat="server" ForeColor="#666666" Text="Período:" Width="100px"></asp:Label><br />
                                                <asp:DropDownList ID="ddlTemporadasCadastradasSubServ" DataTextFormatString="{0:dd/MM/yyyy}" runat="server">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr style="height: 50px;">
                                            <td>
                                                <asp:Label ID="lblFromTempoCopiarSubServ" runat="server" ForeColor="#666666" Text="Data From:"></asp:Label><br />
                                                <asp:TextBox ID="txtPeriodoFromCopiarTempoSubServ" runat="Server" Width="100px" MaxLength="10"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                                                    ControlToValidate="txtPeriodoFromCopiarTempoSubServ" ErrorMessage="*" ValidationGroup="CopiarTempoSubServ" CssClass="MsgErro"
                                                    ToolTip="Campo requerido"></asp:RequiredFieldValidator>
                                                <br />
                                            </td>
                                            <td>
                                                <asp:Label ID="lblToTempoCopiarSubServ" runat="server" ForeColor="#666666" Text="Data To:"></asp:Label><br />
                                                <asp:TextBox ID="txtPeriodoToCopiarTempoSubServ" runat="Server"
                                                    MaxLength="10" Width="100px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
                                                    ControlToValidate="txtPeriodoToCopiarTempoSubServ" ErrorMessage="*" ValidationGroup="CopiarTempoSubServ" CssClass="MsgErro"
                                                    ToolTip="Campo requerido"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr style="height: 50px;">
                                            <td>
                                                <asp:Button ID="btnCopiarTempoSubServ" runat="server" CssClass="btnGeralAzul" OnClick="btnCopiarTempoSubServ_Click" Text="Salvar" ValidationGroup="CopiarTempoSubServ" />
                                            </td>
                                        </tr>
                                    </table>

                                </asp:Panel>

                                <asp:ModalPopupExtender
                                    ID="ModalPopupExtenderCopiarTempoSubServ"
                                    runat="server"
                                    BackgroundCssClass="ModalPopupBG"
                                    CancelControlID="imgFecharTempoSubServ"
                                    DropShadow="false"
                                    Enabled="True"
                                    PopupControlID="PanelCopiarTempoSubServ"
                                    PopupDragHandleControlID="PopupHeader"
                                    RepositionMode="RepositionOnWindowResizeAndScroll"
                                    Drag="true"
                                    TargetControlID="btnCopiarTemporadaSubServ">
                                </asp:ModalPopupExtender>

                                <div class="MServicoFormDir">
                                    <fieldset class="SetMServicoBase">
                                        <legend>
                                            <asp:Label ID="lblMoedaBaseSubServ" Text="" runat="server" Style="font-size: 15px;" />
                                            <asp:Label ID="lblCambioBaseSubServ" Text="" runat="server" Style="font-size: 15px;" />
                                        </legend>
                                        <div class="SupplierBase">
                                            <asp:GridView ID="GridBases" runat="server"
                                                AutoGenerateColumns="False" CssClass="mGrid"
                                                EmptyDataText="Não existe base para este supplier."
                                                GridLines="None" Height="16px" Width="149px">
                                                <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                <Columns>
                                                    <asp:BoundField DataField="Base_de" HeaderText="De" SortExpression="Base_de"></asp:BoundField>
                                                    <asp:BoundField DataField="Base_ate" HeaderText="Para" SortExpression="Base_ate"></asp:BoundField>
                                                    <asp:TemplateField HeaderText="Preço Total">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblValorBase" runat="server" Text="" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="Base_id" HeaderText="ID" SortExpression="Base_id">
                                                        <FooterStyle CssClass="invisible" />
                                                        <HeaderStyle CssClass="invisible" />
                                                        <ItemStyle CssClass="invisible" />
                                                    </asp:BoundField>
                                                </Columns>
                                                <PagerStyle CssClass="pgr"></PagerStyle>
                                            </asp:GridView>
                                            <div class="MServicoSuppliers_into_btnTemporada">

                                                <asp:Panel ID="PanelTemporadasSubServicos" runat="server" CssClass="ModalPopup" Style="display: none; width: 600px; height: 500px; overflow-x: hidden; overflow-y: auto; border-radius: 5px;">
                                                    <asp:ImageButton ID="imgFechaModalTemporadasSubServico" ToolTip="Fechar" runat="server" ImageUrl="../../images/Icones/close2.png" Width="20px" Height="20px" />

                                                    <asp:GridView ID="GridTemporadasSubServicos" runat="server"
                                                        AutoGenerateColumns="False" GridLines="None" CssClass="mGrid" EmptyDataText="Não existe Temporadas para esse Supplier."
                                                        Height="16px"
                                                        Width="94px">
                                                        <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                                        <Columns>

                                                            <asp:BoundField DataField="IdMServico" HeaderText="ID" ReadOnly="True"
                                                                SortExpression="IdMServico" InsertVisible="False">

                                                                <FooterStyle CssClass="invisible" />
                                                                <HeaderStyle CssClass="invisible" />
                                                                <ItemStyle CssClass="invisible" />
                                                            </asp:BoundField>

                                                            <asp:TemplateField HeaderText="Temporada">
                                                                <ItemTemplate>

                                                                    <table>
                                                                        <tr>
                                                                            <td style="border: 0px; font-weight: bold;">Data From: 
                                                                            </td>
                                                                            <td style="border: 0px; font-weight: bold;">
                                                                                <%# string.Format("{0:dd/MM/yyyy}", DataBinder.Eval(Container.DataItem, "MServico_DataFrom")) %>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td style="border: 0px; font-weight: bold;">Data To: 
                                                                            </td>
                                                                            <td style="border: 0px; font-weight: bold;">
                                                                                <%# string.Format("{0:dd/MM/yyyy}", DataBinder.Eval(Container.DataItem, "MServico_DataTo")) %>
                                                                            </td>
                                                                        </tr>
                                                                    </table>

                                                                </ItemTemplate>
                                                                <HeaderStyle Wrap="False" />
                                                                <ItemStyle Wrap="False" />
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Supplier">
                                                                <ItemTemplate>

                                                                    <%# DataBinder.Eval(Container.DataItem, "S_nome") %>
                                                                    <br />
                                                                    <%# DataBinder.Eval(Container.DataItem, "S_telefone") %>
                                                                    <br />
                                                                    <%# DataBinder.Eval(Container.DataItem, "S_email") %>
                                                                </ItemTemplate>
                                                                <HeaderStyle Wrap="False" />
                                                                <ItemStyle Wrap="False" />
                                                            </asp:TemplateField>

                                                            <asp:TemplateField>
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="EditarSubServico" ToolTip="Editar Sub Serviço"
                                                                        runat="server" ImageUrl="~/images/Icones/edit.png"
                                                                        CommandArgument='<%# Eval("IdMServico") %>'
                                                                        OnCommand="EditarSubServico" />
                                                                </ItemTemplate>
                                                                <HeaderStyle Wrap="False" />
                                                                <ItemStyle Wrap="False" />
                                                            </asp:TemplateField>

                                                            <asp:TemplateField>
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="ExluirSubServico" ToolTip="Excluir Sub Serviço"
                                                                        runat="server" CommandArgument='<%# Eval("IdMServico") %>'
                                                                        OnCommand="ExluirSubServico" OnClientClick="return confirm('Excluindo esse serviço, todas as tarifas do mesmo também serão excluídas. Confirma?');"
                                                                        ImageUrl="~/images/Icones/delete.png" />
                                                                </ItemTemplate>
                                                                <HeaderStyle Wrap="False" />
                                                                <ItemStyle Wrap="False" />
                                                            </asp:TemplateField>


                                                        </Columns>

                                                        <PagerStyle CssClass="pgr"></PagerStyle>

                                                    </asp:GridView>

                                                </asp:Panel>

                                                <asp:ModalPopupExtender
                                                    ID="ModalPopupExtenderTemporadasSubServico"
                                                    runat="server"
                                                    BackgroundCssClass="ModalPopupBG"
                                                    CancelControlID="imgFechaModalTemporadasSubServico"
                                                    DropShadow="false"
                                                    Enabled="True"
                                                    PopupControlID="PanelTemporadasSubServicos"
                                                    PopupDragHandleControlID="PopupHeader"
                                                    RepositionMode="RepositionOnWindowResizeAndScroll"
                                                    Drag="true"
                                                    TargetControlID="btnTemporadasCadastradas">
                                                </asp:ModalPopupExtender>

                                            </div>
                                            <asp:Label ID="lblMsgCadSubServico" runat="server" CssClass="MsgErro" />
                                        </div>
                                </div>

                            </div>

                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>


                <div id="tabs-4">

                    <asp:UpdatePanel ID="UpdatePanelServPorSupp" runat="server">
                        <Triggers>
                            <asp:PostBackTrigger ControlID="btnReportFiltroSupplierServPorSupp" />
                        </Triggers>
                        <ContentTemplate>
                            <div id="TarifasServicosPorSupp">
                                <div class="MServicoSuppliersConsulta radius">
                                    <asp:TextBox ID="txtCodSupplierServPorSupp" runat="server" Visible="false" /><p class="paragrafo">
                                        <asp:Label ID="lblSupplierServPorSuppTXT" runat="server" Text="Supplier:"></asp:Label><br />
                                        <asp:TextBox ID="txtSupplierServPorSupp" runat="server" MaxLength="50" placeholder="Informe o nome do supplier." Width="340px"></asp:TextBox>
                                        <asp:AutoCompleteExtender
                                            ID="AutoCompleteExtender1"
                                            runat="server"
                                            CompletionInterval="100"
                                            DelimiterCharacters=""
                                            EnableCaching="False"
                                            Enabled="True"
                                            MinimumPrefixLength="1"
                                            OnClientPopulated="ShowIcon4"
                                            OnClientPopulating="ShowIcon4"
                                            OnClientItemSelected="CallServerServPorSupp"
                                            ServiceMethod="SearchSuppliers"
                                            ServicePath=""
                                            TargetControlID="txtSupplierServPorSupp">
                                        </asp:AutoCompleteExtender>
                                        <img id="processing4" alt="load" src="../../images/ajax-loader.gif" style="visibility: hidden" />
                                        <asp:Button ID="btnFiltroSupplierServPorSupp" runat="server" OnClick="btnFiltroSupplierServPorSupp_Click" Style="display: none"></asp:Button>
                                        <asp:Button ID="btnReportFiltroSupplierServPorSupp" runat="server" OnClick="btnReportFiltroSupplierServPorSupp_Click" CssClass="btnGeralAzul" Text="Report" Visible="false"></asp:Button>
                                    </p>
                                    <div class="GridServPorSupp">
                                        <asp:GridView ID="GridServPorSupp" runat="server"
                                            AutoGenerateColumns="False" CssClass="mGrid"
                                            EmptyDataText="Não existe serviços cadastrado para este supplier."
                                            GridLines="None" Height="16px" Width="340px">
                                            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                                            <Columns>
                                                <asp:BoundField DataField="Servicos_Nome" HeaderText="Serviço">
                                                    <HeaderStyle Wrap="False" />
                                                    <ItemStyle Wrap="False" Font-Size="Small" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="MServico_DataFrom" HeaderText="Data From" DataFormatString="{0:dd/MM/yyyy}" />
                                                <asp:BoundField DataField="MServico_DataTo" HeaderText="Data To" DataFormatString="{0:dd/MM/yyyy}" />
                                            </Columns>
                                            <PagerStyle CssClass="pgr"></PagerStyle>
                                        </asp:GridView>
                                        <asp:Label ID="lblMsgCadServPorSupp" CssClass="MsgErro" runat="server" Text="" />
                                    </div>
                                </div>
                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>

                </div>

            </div>

            <div id="UpdateProgress"
                style="position: absolute; z-index: 1; left: 50%; top: 50%;">
                <asp:UpdateProgress ID="UpdateProgress3" runat="server"
                    AssociatedUpdatePanelID="">
                    <ProgressTemplate>
                        <asp:Image ID="imgLoading" runat="server"
                            ImageUrl="~/Images/ajax-loaderG.gif" />
                    </ProgressTemplate>
                </asp:UpdateProgress>
            </div>

        </div>
    </form>
</body>
</html>
